package register

import (
	"context"
	"io"
)

type Register interface {
	RegisterService(ctx context.Context, si ServiceInstance) error
	UnRegisterService(ctx context.Context, si ServiceInstance) error
	ListService(ctx context.Context, serviceName string) ([]ServiceInstance, error)
	Subscribe(serviceName string) <-chan Event
	io.Closer
}

type ServiceInstance struct {
	ServiceName string
	Addr        string
	Group       string
	Weight      int
}

type Event struct{}
